<?php if (!defined('SERVER_ROOT')) {exit('No direct script access allowed');}
//header
$this->template->title = 'Danh mục cán bộ';
$this->template->display('dsp_header.php');
$TEN_TO_CHUYEN_MON = '';
$TEN_DON_VI = '';
while ($arr = $arr_single_tochuyenmon->FetchRow()){
    $TEN_TO_CHUYEN_MON = $arr['TEN_TO_CHUYEN_MON'];
    $TEN_DON_VI= $arr['TEN_DON_VI'];
}
?>
 <form name="frmMain" id="frmMain" action="" method="POST">
    <?php
    echo $this->hidden('controller',$this->get_controller_url());
    echo $this->hidden('hdn_item_id','0');
    echo $this->hidden('hdn_item_id_list','');
    echo $this->hidden('hdn_dsp_single_method','dsp_single_canbo');
    echo $this->hidden('hdn_dsp_all_method','dsp_all_canbo');
    echo $this->hidden('hdn_update_method','update_canbo');
    echo $this->hidden('hdn_delete_method','delete_canbo');
    echo $this->hidden('hdn_TYPE_filter', 'MA_DON_VI');
    $v_row = 0;

    ?>
    <h3 style="text-align:center;text-transform: uppercase">
    <?php echo $TEN_DON_VI;?> <br />
    </h3>
    <h4 style="text-align:center;text-transform: uppercase">
    <?php echo $TEN_TO_CHUYEN_MON;?>
    </h4>
   <div id="div_filter">

        <input class = 'button' type="button" name="btn_add_canbo" value="Thêm cán bộ" onclick="location.href='<?php echo SITE_ROOT . 'qlcb/canbo/dsp_single_canbo/&m=0'?>'"/>

	</div>

    <table  width="100%" class="adminlist" cellspacing="0" border="1">
        <colgroup>
            <col width="40%" />
            <col width="20%" />
            <col width="6%" />
            <col width="8%" />
            <col width="26%" />
        </colgroup>
        <tr>
            <th>Tên cán bộ</th>
            <th>Chức vụ</th>
            <th>Thứ tự</th>
            <th>Trạng thái</th>
            <th>Thao tác</th>
        </tr>
         <?php while ($arr = $arr_all_canbo->FetchRow()): ?>
           <?php
               $ALL_TR=$arr['ALL_TR'];
               $TONG_SO_DONG=$arr['TONG_SO_DONG'];
               echo $arr['ALL_TR'];?>
           <?php endwhile; ?>
        <?php echo $this->add_empty_rows($TONG_SO_DONG, _CONST_DEFAULT_ROWS_PER_PAGE, 5);?>
    </table>

</form>
<script>
    function qtct_canbo_click(macanbo){
        var url = '<?php echo $this->get_controller_url();?>dsp_all_to_of_canbo/' + macanbo
            url += '/?&macanbo=' + macanbo + '&pop_win=1';
        showPopWin(url ,700,350, null);
    }
    function phanquyen_canbo_click(macanbo,tencanbo){
        var url = '<?php echo $this->get_controller_url();?>dsp_all_nhomquyen/'  + macanbo
            url += '/?&tencanbo=' + tencanbo + '&hdn_item_id=' + macanbo + '&pop_win=1' + '&hdn_item_name=' + tencanbo;
        showPopWin(url ,420,400, null);
    }
    function quick_delete_canbo(macanbo)
    {
        var f = document.frmMain;
        if (confirm('Bạn chắc chắn xoá đối tượng đã chọn?')){
            f.hdn_item_id.value =  macanbo;
            m = $("#controller").val() + 'delete_canbo'
            $("#frmMain").attr("action", m);
            f.submit();
        }
    }

</script>
<?php $this->template->display('dsp_footer.php');